#ifndef __CROSSFIRE_DRAWRENDERER
#define __CROSSFIRE_DRAWRENDERER

class CF_CORE_API CCF_DrawRenderer
{
private:
  LPDIRECT3D9 m_direct3D;
  LPDIRECT3DDEVICE9 m_device3D;

  CCF_TextureLoader* m_textureLoader;
  CCF_Font* m_font;
  CCF_Settings* m_pSettings;
  CCF_Log* m_pLog;

  LPDIRECT3DSURFACE9	g_pScreenshot;
  UINT				g_uNumScreenshots	;
  #define SAFE_RELEASE( x )	{ if( x ) { x->Release(); x = NULL; } }
public:
  CCF_DrawRenderer(void);
  ~CCF_DrawRenderer(void);

  BOOL Initialize( HWND hwnd );
  void SetCamera( CCF_Camera* camera );
  void Begin();
  void End();

  CCF_Font* GetFont();
  CCF_TextureLoader* GetTextureLoader();
  LPDIRECT3DDEVICE9 GetDevice();
  HRESULT ScreenGrab();
  void MipMapFilter();
  void AnisotropicFilter();
  void LinearFilter();
  int ConvertD3DFormat(D3DFORMAT d3dformat);
  void ShowVideoModesToLog();
};

#endif